<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>重置密码</title>
    <link rel="stylesheet" href="../resources/css/bootstrap.min.css">
    <link href="../resources/css/forget.css" type="text/css" rel="stylesheet" />
</head>
<body>
<script>
    function check(form){
        if(form.password.value === form.repassword.value) {
            return true;
        }
        alert('两次密码不一致！');
        return false;
    }
</script>
<h1 style="margin-top: 120px; color: white;font-family: cursive;font-size: 50px " class="text-center">欢迎来到学校教务系统</h1>
<%
    String id = request.getParameter("id");
    String email = request.getParameter("email");
%>
<div class="main">
    <form role="form" action="../update_teacher_password" method="post" onsubmit="return check(this)">
        <div class="form-group" align="center">
            <input type="password" class="form-control" name="password" placeholder="新密码"><br>
            <input type="password" class="form-control" name="repassword" placeholder="确认密码"><br>
            <input type="hidden" name="id" value="<%=id%>">
            <input type="hidden" name="email" value="<%=email%>">
            <input type="submit" class="btn btn-success" value="提交">
            <input type="button" class="btn btn-info" value="取消" style="margin-left: 20px" onclick="window.location.href='../login.jsp'">
        </div>
    </form>
</div>
<script src="../resources/js/jquery-3.2.1.min.js"></script>
<script src="../resources/js/popper.min.js"></script>
<script src="../resources/js/bootstrap.min.js"></script>
</body>
</html>
